<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=divice-width,initial-scale=1.0">
	<title>let和const命令</title>
</head>
<body>
<script type="text/javascript">
	//传统的定义变量和常量的方式，统一使用var
	//变量
	var name1 = 'xiaoming';
	var link1 = 'http://www.baidu.com';
	//常量
	var PI1 = Math.PI;

	console.log(name1);
	console.log(link1);
	console.log(PI1);

	//Es6 定义的方式
	//变量
	let name2 = 'daming';
	let link2 = 'http://www.baidu.com';
	//常量
	const PI2 = Math.PI;

	console.log(name2);
	console.log(link2);
	console.log(PI2);

</script>
</body>
</html>